package com.guigu.eduservice.service.impl;

import com.guigu.eduservice.entity.Order;
import com.guigu.eduservice.mapper.OrderMapper;
import com.guigu.eduservice.service.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单表（存储买卖双方的交易订单信息） 服务实现类
 * </p>
 *
 * @author Xiaosong
 * @since 2025-10-01
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
    @Autowired
    private OrderMapper orderMapper;
    @Override
    public List<Order> selectFourAdvertisement() {
        return orderMapper.selectFourAdvertisement();
    }

    @Override
    public Order getOrder(Long id) {
        return orderMapper.selectEquipmentById(id);
    }
}
